<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>订单管理 - 导出订单信息</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
<link rel="stylesheet" type="text/css" href="/style/assets/plugins/bootstrap-datetimepicker/css/datetimepicker.css" />
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 导出订单信息 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 会员管理 <i class="icon-angle-right"></i> </li>
          <li> <a href="/order/olist">订单管理</a> <i class="icon-angle-right"></i> </li>
          <li>导出订单信息</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-9"> 
        <!-- BEGIN SAMPLE FORM PORTLET-->
        <div class="portlet box blue">
          <div class="portlet-title">
            <div class="caption"> <i class="icon-reorder"></i> <?=$_GET['type']==1 ? '导出已发货订单' : '导出未发货订单';?> </div>
            <div class="tools"> <a href="" class="collapse"></a> </div>
          </div>
          <div class="portlet-body form">
            <form method="get" class="form-horizontal" id="forms" action="/order/exportBatch">       
              <input type="hidden" name="type" value="<?=$_GET['type'];?>">       
              <div class="form-body">
                <div class="form-group">
                  <label class="col-md-3 control-label">开始时间</label>
                  <div class="col-md-6">
                    <div class="input-group date form_datetime" data-date="<?=date("Y-m-d\TH:i\Z");?>">
                            <input type="text" size="16" name="start_time" placeholder="选择开始时间" id="start_time" readonly class="form-control">
                            <span class="input-group-btn">
                            <button class="btn default date-reset" type="button"><i class="icon-remove"></i></button>
                            </span> <span class="input-group-btn">
                            <button class="btn default date-set" type="button"><i class="icon-calendar"></i></button>
                            </span> </div>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">结束时间</label>
                  <div class="col-md-6">
                    <div class="input-group date form_datetime" data-date="<?=date("Y-m-d\TH:i\Z");?>">
                            <input type="text" size="16" name="end_time" placeholder="选择结束时间" id="end_time" readonly class="form-control">
                            <span class="input-group-btn">
                            <button class="btn default date-reset" type="button"><i class="icon-remove"></i></button>
                            </span> <span class="input-group-btn">
                            <button class="btn default date-set" type="button"><i class="icon-calendar"></i></button>
                            </span> </div>
                  </div>
                </div> 
                <hr>
                 <div class="form-group">
                  <label class="col-md-3 control-label">选择供应商</label>
                  <div class="col-md-6">
                    <select name="supplier_id" id="_supplier_id" class="form-control">
                            <option value="">选择供应商</option>
                            <?php
                            if($this->supplier){
                              foreach($this->supplier as $r){
                              ?>
                                <option value="<?=$r['id'];?>"><?=$r['supplier'];?></option>
                              <?
                              }
                            }             
                            ?>
                          </select>
                  </div>
                </div>
<!--               <div class="form-group">
                  <label class="col-md-3 control-label">选择仓库</label>
                  <div class="col-md-6">
                    <select name="warehouse_type" class="form-control">
                            <option value="">选择仓库</option>
                            <?php
/*                            if($this->c['warehouse_types']){
                              foreach($this->c['warehouse_types'] as $k=>$r){
                              */?>
                                <option value="<?/*=$k;*/?>"><?/*=$r;*/?></option>
                              <?/*
                              }
                            }             
                            */?>
                          </select>
                  </div>
                </div>-->
<!--                <div class="form-group">
                  <label class="col-md-3 control-label">会员类型</label>
                  <div class="col-md-6">
                    <select name="member_type" class="form-control">
                    <option value="">所有会员</option>
                    <option value="1">VIP晋升制</option>
                    <option value="2">代理晋升制</option>
                    <option value="3">游客</option>
                    </select>
                  </div>
                </div>  -->
              </div>
              <div class="form-actions fluid">
                <div class="col-md-offset-3 col-md-9">
                <input type="hidden" name="type" value="<?=$this->type;?>">
                  <button type="button" class="btn blue" onclick="chkfrm()">导出</button>
                  <button type="button" class="btn default" onClick="history.back(1);">取消</button>
                </div>
              </div>
            </form>
          </div>
        </div>
        <!-- END SAMPLE FORM PORTLET--> 
        
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script type="text/javascript" src="/style/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script> 
<script type="text/javascript" src="/style/assets/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script>
var handleDatetimePicker = function () {
  $(".form_datetime").datetimepicker({
    language:'zh-CN',
    autoclose: true,
    format: "yyyy-mm-dd hh:ii"
  }); 
  $('body').removeClass("modal-open"); // fix bug when inline picker is used in modal
}
$(document).ready(function(e) {    
   App.init();  
   handleDatetimePicker();  
});

function chkfrm()
{

  if( $("#start_time").prop("value")=="")
  {
	  alert("请选择开始时间");
    return false;
  }

  if( $("#end_time").prop("value")=="")
  {
	  alert("请选择结束时间");
    return false;
  }

/*   if( $("#_supplier_id").val()=="")
  {
	  alert("请选择供应商");
    return false;
  } */

  $('#forms').submit();
}

</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>